// updated; 140106-2101;
#include "StdAfx.h"
#include "Factor.h"

#include "PlotChartStatic.h"
#include "Test.h"

Factor * gman = NULL;
static CPlotChartStatic * mplotchat = NULL;

Factor::Factor(void)
{
	gman = this;
	TRACE(TEXT("->Factor::Factor().\n"));
	//gman = &g_man;

	create();

}
Factor::~Factor(void)
{
	TRACE(TEXT("->Factor::~Factor().\n"));
	destory();

	gman = NULL;
}
int Factor::create()
{
	TRACE(TEXT("->Factor::creates().\n"));
	mplotchat = new CPlotChartStatic();	ghash->add("plotchat", mplotchat);
	
	gtest = new Test();

	return 0;
}
void Factor::destory()
{
	TRACE(TEXT("-> Factor::destorys().\n"));

	if( gtest) { delete gtest; }

	if( mplotchat ) { ghash->del(mplotchat);	delete mplotchat; mplotchat = NULL; }
}

int Factor::init()
{
	if( LFactor::init() < 0 ) return -1;

	TRACE(TEXT("-> Factor::ints().\n"));
	int ret = 0;
	//if( (ret=LFactor::init()) < 0 ) return ret;
	mplotchat->linit();
	
	gtest->ainit();

	return ret;
}
void Factor::exit()
{
	TRACE(TEXT("-> Factor::exits().\n"));

	gtest->aexit();

	//mplotchat->lexit();
	
	LFactor::exit();
}



